export enum Side {
    buy= 'buy',
    sell = 'sell',
}

export interface Order {
    id: string;
    type: string;
    side: Side;
    _status: string;
    price: number;
    amount: number;
    createdAt: string;
    updatedAt: string;
}

export enum PositionStatus {
    Closed = 'closed',
    Open = 'open',
    PartiallyFilled = 'partiallyFilled',
    Invested = 'invested',
}

export interface Position {
    id: string;
    symbol: string;
    inOrders: string[];
    outOrders: string[];
    stopLoss: number;
}

export interface PositionOrder {
    time: number;
    price: number;
    side: Side;
}

export interface PositionInfo {
    id: string;
    status: PositionStatus;
    openTime: string;
    closeTime: string;
    balanceDelta: number;
    balanceDeltaPercent: number;
    inOrders: PositionOrder[];
    outOrders: PositionOrder[];
    stopLoss: number;
}

export interface Tick {
    time: number;
    open: number;
    high: number;
    low: number;
    close: number;
    volume: number;
}

export enum ExtremumType {
    support= 'support',
    resistance = 'resistance',
}

export interface Extremum {
    type: ExtremumType;
    time: number;
    price: number;
}